<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}"/>
    <style>
        #container{
            width: 90%;
            margin: 30px auto;
        }
    </style>
</head>
<body>
    <div id="container">
        <form class="form-inline" role="form" th:action="@{/state}" method="post">
            <div class="form-group">
                <label for="state">搜索地区：</label>
                <input type="text" class="form-control" id="state" name="state" placeholder="请输入地区">
            </div>
            <button type="submit" class="btn btn-default">提交</button>
        </form><br>
        <form class="form-inline" role="form" th:action="@{/country}" method="post">
            <div class="form-group">
                <label for="country">搜索国家：</label>
                <input type="text" class="form-control" id="country" name="country" placeholder="请输入国家">
            </div>
            <button type="submit" class="btn btn-default">提交</button>
        </form>
        <table class="table table-hover">
            <caption>全球新型冠状病毒实时数据统计</caption>
            <thead>
                <tr>
                    <th>地区</th>
                    <th>国家</th>
                    <th>累计确诊人数</th>
                    <th>较前日增加确诊人数</th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="item:${list}">
                    <td th:text="${item.getState()}"></td>
                    <td th:text="${item.getCountry()}"></td>
                    <td th:text="${item.getLatestTotalCases()}"></td>
                    <td th:text="${item.getDiffFromPrevDay()}"></td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
</html>